#include <iostream>
#include <iomanip>
using namespace std;

int scores[100];

int main()
{
    ios::sync_with_stdio(false);
    int C, N;
    double average;
    int higher;
    cin >> C;
    while (C--)
    {
        average = 0.0;
        higher = 0;
        cin >> N;
        for (int i = 0; i < N; i++)
        {
            cin >> scores[i];
        }
        for (int i = 0; i < N; i++)
        {
            average += (double)scores[i];
        }
        average /= N;
        for (int i = 0; i < N; i++)
        {
            if (scores[i] >= average)
            {
                higher++;
            }
        }
        cout << fixed << setprecision(2) << average << " " << higher << endl;
    }
    return 0;
}